package test.lx.test01application

import android.Manifest
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*
import test.lx.lib_workfrist.MainActivity
import test.lx.test01application.permissionhelper.PermissionsActivity
import test.lx.test01application.permissionhelper.PermissionsChecker

class MainActivity : AppCompatActivity() {


    val PERMISSIONS = arrayOf( //权限集合
        Manifest.permission.SYSTEM_ALERT_WINDOW
    )


    val REQUEST_PERMISSION = 4 //权限请求


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        //        InitBusinessHelper.initApp(context);
        var mPermissionsChecker = PermissionsChecker(this)
        tv_hello.setOnClickListener {


//            if (mPermissionsChecker.lacksPermissions(*PERMISSIONS)) {
//                PermissionsActivity.startActivityForResult(
//                    this,
//                    REQUEST_PERMISSION,
//                    *PERMISSIONS
//                )
//            }else{
                startActivity(Intent(this, MainActivity::class.java ))
//            }

        }

    }
}
